The EMF Model Transformation Framework
نویسندگان
چکیده
We present the EMF Model Transformation framework (EMT), which supports the rule-based modification of EMF models. Model transformation rules are defined graphically and compiled into Java code to be used in model transformation applications. Introduction. The Eclipse Modeling Framework (EMF)[1] provides a modeling and code generation framework for Eclipse applications based on structured data models. The goal of the EMF Model Transformation framework (EMT) is to support the modification of EMF models based on graphical EMF model transformation rules. EMT currently consists of three components: a graphical editor for EMF model transformation rules, a compiler, generating Java code from these rules to be used in further projects, and an interpreter for the execution of the rules using AGG [2], a graph transformation tool environment. Definition of EMF Model Transformations. Transformations of EMF models are defined by transformation rules. Each rule consists of a left-hand side (LHS), a right-hand side (RHS), possible negative application conditions (NACs) and mappings between these object structures. An object structure consists of a number of possibly linked objects conforming to the EMF models for which the transformation is defined. Each of these structures is visualized in the graphical editor by a diagram that contains a number of object nodes which can be connected and/or attributed. The left-hand side of a rule formulates the structural preconditions that must be fulfilled to apply the rule. Accordingly, a right-hand side describes the result (or postconditions) of a rule. Negative application conditions are defined in the same way and describe structural conditions that must not be fulfilled for rule application. Furthermore it is possible to define a layer for each rule. Rules on lower layers are applied prior to those on higher layers. Attributes of an object can be calculated using Java. Each expression may contain variables defined in the context of the rule the expression is used in. Fig. 1 shows a screenshot of EMT where a model transformation from activity diagrams to Petri nets is defined. The loaded EMF models are shown in the lower center, while a three-pane rule editor is depicted above. Corresponding objects A. Schürr, M. Nagl, and A. Zündorf (Eds.): AGTIVE 2007, LNCS 5088, pp. 566–567, 2008. c © Springer-Verlag Berlin Heidelberg 2008 The EMF Model Transformation Framework 567 Fig. 1. EMF model transformation perspective in these panes are colored equally to visualize rule mappings. The EMT compiler generates a Java class for each defined rule. Such a class contains methods for setting rule parameters, checking applicability, as well as performing and undoing rule applications which change models in-place. Applications of the EMT framework so far include endogenous model transformations such as the extension of Eclipse GMF-generated editors by complex editor commands [3], as well as refactoring of EMF models [4,5], and exogenous model transformations from class diagrams to relational date bases, from activity diagrams to Petri nets and from UML to CSP.
منابع مشابه
Formal Semantics of Consistent EMF Model Transformations by Algebraic Graph Transformation
Model transformation is one of the key activities in model-driven software development. An increasingly popular technology to define modeling languages is provided by the Eclipse Modeling Framework (EMF). Several EMF model transformation approaches have been developed, focusing on different transformation aspects. To validate model transformations wrt. functional behavior and correctness, a for...
متن کاملLocal Confluence Analysis of Consistent EMF Transformations
Model transformation is one of the key activities in model-driven software development. An increasingly popular technology to define modeling languages is provided by the Eclipse Modeling Framework (EMF). Several EMF model transformation approaches have been developed, focusing on different transformation aspects. For the analysis of model transformations, graph transformation techniques provid...
متن کاملEMF Model Refactoring based on Graph Transformation Concepts
The Eclipse Modeling Framework (EMF) provides a modeling and code generation framework for Eclipse applications based on structured data models. Within model driven software development based on EMF, refactoring of EMF models become a key activity. In this paper, we present an approach to define EMF model refactoring methods as transformation rules being applied in place on EMF models. Performi...
متن کاملTHE EASST NEWSLETTER Tool Integration by Model Transformations based on the Eclipse Modeling Framework
In the paper, we propose various approaches for tool integration based on model transformations over the Eclipse Modeling Framework (EMF). EMF is a key technology for tool integration, which provides a framework for developing domain-specific modeling languages by automatically generating Java code for model manipulation. Model transformations can be captured by graph transformation systems, wh...
متن کاملPrecise Semantics of EMF Model Transformations by Graph Transformation
Model transformation is one of the key activities in model-driven software development. An increasingly popular technology to define modeling languages is provided by the Eclipse Modeling Framework (EMF). Several EMF model transformation approaches have been developed, focusing on different transformation aspects. To validate model transformations wrt. functional behavior and correctness, a for...
متن کامل